<%@LANGUAGE="VBSCRIPT"%> 
<!--#include file="Connections/labdict.asp" -->
<%
Dim alpha, Intro, DivID, myQstring
alpha = request.querystring("alpha")
alpha = alpha + "%"
intro = "Click a test below to add or update information in its database entry."
DivID = request.querystring("DIVISION_ID")
myQstring = ""
if request.querystring("DIVISION_ID") <> "" then
myQstring = myQstring + "DIVISION_ID=" + request.querystring("DIVISION_ID")
end if
if myQstring <> "" and request.querystring("alpha") <> "" then
myQstring = myQstring + "&"
end if
if request.querystring("alpha") <> "" then
myQstring = myQstring + "alpha=" + request.querystring("alpha")
end if
%>
<%
Dim rsList__MMColParam
rsList__MMColParam = "1"
if (Request.QueryString("DIVISION_ID") <> "") then rsList__MMColParam = Request.QueryString("DIVISION_ID")
%>
<%
Dim connStr
If DivID > 3 and DivID <= 5 then
connStr = "SELECT TEST, TEST_ID FROM LABDICT_TEST WHERE DIVISION_ID = " + rsList__MMColParam
else
connStr = "SELECT TEST, TEST_ID FROM LABDICT_TEST WHERE DIVISION_ID = " + rsList__MMColParam + " AND TEST LIKE '" + alpha + "'"
end if
%>
<%
set rsList = Server.CreateObject("ADODB.Recordset")
rsList.ActiveConnection = MM_labdict_STRING
rsList.Source = connStr
rsList.CursorType = 0
rsList.CursorLocation = 2
rsList.LockType = 3
rsList.Open()
%>
<%
if rsList.EOF then
intro = "No matching tests were found"
end if
%><html>
<head>
<title>Test List</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="tables.css" type="text/css">
</head>

<body bgcolor="#FFFFFF" text="#000000" link="#333366" vlink="#333333">
<table width="660" border="0" cellspacing="0" cellpadding="2" align="center">
  <tr> 
    <td colspan="5"><img src="images/Banner.jpg" width="660" height="108"></td>
  </tr>
  <tr> 
    <td colspan="5" height="2">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="5" height="3">
      <div align="center"><b><%Response.write(intro)%></b><br>&nbsp;</div>
    </td>
  </tr>
  <%While (NOT rsList.EOF)%>
  <tr> 
    <td height="5">&nbsp;</td>
    <td height="5"> 
      <div align="left"><a href="testupdate.asp?<%= myQstring & "&TEST_ID=" & rsList.Fields.Item("TEST_ID").Value %>"><%=(rsList.Fields.Item("TEST").Value)%></a> </div>
    </td>
    <%
	rsList.MoveNext()
	if rsList.EOF then
	recordStr = "&nbsp;"
	else
	recordStr = "<a href='TestUpdate.asp?TEST_ID="
	recordStr = recordStr + Cstr(rsLIst.Fields.Item("TEST_ID").Value)
	recordStr = recordStr + "&"
	recordStr = recordStr + myQstring + "'>"
	recordStr = recordStr + Cstr(rsList.Fields.Item("TEST").Value)
	recordStr = recordStr + "</a>"
	rsList.MoveNext()
	end if
	%>
    <td height="5">&nbsp;</td>
    <td height="5"> 
      <div align="left">
        <%Response.Write(recordStr)%>
      </div>
    </td>
    <td height="5">&nbsp;</td>
  </tr>
  <%
  Wend
  %>
  <tr> 
    <td colspan="5" height="10">&nbsp;</td>
  </tr>
  <tr> 
    <td colspan="5"> 
      <div align="center">Use the links below to find tests by discipline</div>
    </td>
  </tr>
  <tr> 
    <td colspan="5" height="10">&nbsp;</td>
  </tr>
  <tr> 
    <td align="center" bgcolor="#333366" colspan="5"> 
      <div align="center"><b><font color="#FFFFFF">chemistry</font></b></div>
    </td>
  </tr>
  <tr> 
    <td align="center" colspan="5"> 
      <div align="center"><a href="list.asp?DIVISION_ID=1&alpha=a">A</a> | <a href="list.asp?DIVISION_ID=1&alpha=b">B</a> 
        | <a href="list.asp?DIVISION_ID=1&alpha=c">C</a> | <a href="list.asp?DIVISION_ID=1&alpha=d">D</a> 
        | <a href="list.asp?DIVISION_ID=1&alpha=e">E</a> | <a href="list.asp?DIVISION_ID=1&alpha=f">F</a> 
        | <a href="list.asp?DIVISION_ID=1&alpha=g">G</a> | <a href="list.asp?DIVISION_ID=1&alpha=h">H</a> 
        | <a href="list.asp?DIVISION_ID=1&alpha=i">I</a> | <a href="list.asp?DIVISION_ID=1&alpha=j">J</a> 
        | <a href="list.asp?DIVISION_ID=1&alpha=k">K</a> | <a href="list.asp?DIVISION_ID=1&alpha=l">L</a> 
        | <a href="list.asp?DIVISION_ID=1&alpha=m">M</a> | <a href="list.asp?DIVISION_ID=1&alpha=n">N</a> 
        | <a href="list.asp?DIVISION_ID=1&alpha=o">O</a> | <a href="list.asp?DIVISION_ID=1&alpha=p">P</a> 
        | <a href="list.asp?DIVISION_ID=1&alpha=q">Q</a> | <a href="list.asp?DIVISION_ID=1&alpha=r">R</a> 
        | <a href="list.asp?DIVISION_ID=1&alpha=s">S</a> | <a href="list.asp?DIVISION_ID=1&alpha=t">T</a> 
        | <a href="list.asp?DIVISION_ID=1&alpha=u">U</a> | <a href="list.asp?DIVISION_ID=1&alpha=v">V</a> 
        | <a href="list.asp?DIVISION_ID=1&alpha=w">W</a> | <a href="list.asp?DIVISION_ID=1&alpha=x">X</a> 
        | <a href="list.asp?DIVISION_ID=1&alpha=y">Y</a> | <a href="list.asp?DIVISION_ID=1&alpha=z">Z</a> 
        | <a href="inserttest.asp?DIVISION_ID=1">add a test</a></div>
    </td>
  </tr>
  <tr bgcolor="#333366"> 
    <td colspan="5"> 
      <div align="center"><b><font color="#FFFFFF">hematology</font></b></div>
    </td>
  </tr>
  <tr> 
    <td colspan="5"> 
      <div align="center"><a href="list.asp?DIVISION_ID=2&alpha=a">A</a> | <a href="list.asp?DIVISION_ID=2&alpha=b">B</a> 
        | <a href="list.asp?DIVISION_ID=2&alpha=c">C</a> | <a href="list.asp?DIVISION_ID=2&alpha=d">D</a> 
        | <a href="list.asp?DIVISION_ID=2&alpha=e">E</a> | <a href="list.asp?DIVISION_ID=2&alpha=f">F</a> 
        | <a href="list.asp?DIVISION_ID=2&alpha=g">G</a> | <a href="list.asp?DIVISION_ID=2&alpha=h">H</a> 
        | <a href="list.asp?DIVISION_ID=2&alpha=i">I</a> | <a href="list.asp?DIVISION_ID=2&alpha=j">J</a> 
        | <a href="list.asp?DIVISION_ID=2&alpha=k">K</a> | <a href="list.asp?DIVISION_ID=2&alpha=l">L</a> 
        | <a href="list.asp?DIVISION_ID=2&alpha=m">M</a> | <a href="list.asp?DIVISION_ID=2&alpha=n">N</a> 
        | <a href="list.asp?DIVISION_ID=2&alpha=o">O</a> | <a href="list.asp?DIVISION_ID=2&alpha=p">P</a> 
        | <a href="list.asp?DIVISION_ID=2&alpha=q">Q</a> | <a href="list.asp?DIVISION_ID=2&alpha=r">R</a> 
        | <a href="list.asp?DIVISION_ID=2&alpha=s">S</a> | <a href="list.asp?DIVISION_ID=2&alpha=t">T</a> 
        | <a href="list.asp?DIVISION_ID=2&alpha=u">U</a> | <a href="list.asp?DIVISION_ID=2&alpha=v">V</a> 
        | <a href="list.asp?DIVISION_ID=2&alpha=w">W</a> | <a href="list.asp?DIVISION_ID=2&alpha=x">X</a> 
        | <a href="list.asp?DIVISION_ID=2&alpha=y">Y</a> | <a href="list.asp?DIVISION_ID=2&alpha=z">Z</a> 
        | <a href="inserttest.asp?DIVISION_ID=2">add a test</a></div>
    </td>
  </tr>
  <tr bgcolor="#333366"> 
    <td colspan="5"> 
      <div align="center"><font color="#FFFFFF"><b>microbiology</b></font></div>
    </td>
  </tr>
  <tr> 
    <td colspan="5"> 
      <div align="center"><a href="list.asp?DIVISION_ID=3&alpha=a">A</a> | <a href="list.asp?DIVISION_ID=3&alpha=b">B</a> 
        | <a href="list.asp?DIVISION_ID=3&alpha=c">C</a> | <a href="list.asp?DIVISION_ID=3&alpha=d">D</a> 
        | <a href="list.asp?DIVISION_ID=3&alpha=e">E</a> | <a href="list.asp?DIVISION_ID=3&alpha=f">F</a> 
        | <a href="list.asp?DIVISION_ID=3&alpha=g">G</a> | <a href="list.asp?DIVISION_ID=3&alpha=h">H</a> 
        | <a href="list.asp?DIVISION_ID=3&alpha=i">I</a> | <a href="list.asp?DIVISION_ID=3&alpha=j">J</a> 
        | <a href="list.asp?DIVISION_ID=3&alpha=k">K</a> | <a href="list.asp?DIVISION_ID=3&alpha=l">L</a> 
        | <a href="list.asp?DIVISION_ID=3&alpha=m">M</a> | <a href="list.asp?DIVISION_ID=3&alpha=n">N</a> 
        | <a href="list.asp?DIVISION_ID=3&alpha=o">O</a> | <a href="list.asp?DIVISION_ID=3&alpha=p">P</a> 
        | <a href="list.asp?DIVISION_ID=3&alpha=q">Q</a> | <a href="list.asp?DIVISION_ID=3&alpha=r">R</a> 
        | <a href="list.asp?DIVISION_ID=3&alpha=s">S</a> | <a href="list.asp?DIVISION_ID=3&alpha=t">T</a> 
        | <a href="list.asp?DIVISION_ID=3&alpha=u">U</a> | <a href="list.asp?DIVISION_ID=3&alpha=v">V</a> 
        | <a href="list.asp?DIVISION_ID=3&alpha=w">W</a> | <a href="list.asp?DIVISION_ID=3&alpha=x">X</a> 
        | <a href="list.asp?DIVISION_ID=3&alpha=y">Y</a> | <a href="list.asp?DIVISION_ID=3&alpha=z">Z</a> 
        | <a href="inserttest.asp?DIVISION_ID=3">add a test</a></div>
    </td>
  </tr>
  <tr bgcolor="#333366"> 
    <td width="50">&nbsp;</td>
    <td width="255"> 
      <div align="center"><font color="#FFFFFF"><b><a href="list.asp?DIVISION_ID=4"><font color="#FFFFFF">pathology</font> 
        </a> </b><a href="list.asp?DIVISION_ID=4"><font color="#FFFFFF">[all]</font></a> 
        | <a href="inserttest.asp?DIVISION_ID=4"><font color="#FFFFFF">add a test</font></a></font></div>
    </td>
    <td width="50">&nbsp;</td>
    <td width="255"> 
      <div align="center"><font color="#FFFFFF"><b><a href="list.asp?DIVISION_ID=5"><font color="#FFFFFF">blood 
        transfusion</font></a></b> <a href="list.asp?DIVISION_ID=5"><font color="#FFFFFF">[all]</font></a> 
        | <a href="inserttest.asp?DIVISION_ID=4"><font color="#FFFFFF">add a test</font></a></font></div>
    </td>
    <td width="50">&nbsp;</td>
  </tr>
</table>
</body>
</html>
<%
rsList.Close()
%>